<extend name="Layout:layout_content" />
<block name="body_main">
    <div class="grid-parent xsui-page-header">
        <div class="grid-60 mobile-grid-100 grid-parent">
            <a href="{:U('address_export')}" class="xsui-btn ui-state-default"><i class="fa fa-save"></i>导出</a>
            <a href="{:U('address_delete','id=varkey')}" class="xsui-btn ui-state-default lnk-remove"><i class="fa fa-remove"></i>批量删除</a>
        </div>
        <div class="grid-40 mobile-grid-100 grid-parent xsui-text-right">
            <a href="#" class="xsui-btn ui-state-default lnk-refresh"><i class="fa fa-refresh"></i>刷新</a>
            <span class="xsui-input-group">
                <form method="get">
                    <input type="text" name="search_key" value="{$search.search_key}" placeholder="编号/姓名/手机号码" />
                    <button type="submit" class="ui-state-default"><i class="fa fa-search"></i>搜索</button><button id="btn-search-dialog" class="ui-state-default xsui-icon-only" title="高级搜索"><i class="fa fa-gear"></i></button>
                </form>
            </span>
        </div>
        <div id="search-dialog" class="xsui-hidden" style="width:340px;">
            <form method="get" class="xsui-form">
                <table>
                </table>
                <button type="submit">保存</button>
            </form>
        </div>
    </div>
    <div id="xsui_container">
        {$content}
    </div>
</block>
<block name="body_after">
    <script type="text/javascript">
        // 状态显示处理 2016-1-18 SoChishun Added.
        // 如：<td class="status"><a href="AddonU('change_status','id='.$vo['id'].'&status=varstatus')" title="点击隐藏" data-value="$vo.status" class="xsui-success"><i class="fa fa-check fa-fw"></i></a></td>
        $('td.status a').togglelink();
        // 动态更改排序 2015-10-24 SoChishun Added.
        $('td.sort input').blur(function () {
            var $input = $(this);
            change_sort($input);
        })
        $('input[name="chk"]').click(function () {
            if ('undefined' == typeof (window.parent.set_address)) {
                alert('未设置选择地址的方法!');
            } else {
                var $tr = $(this).parent().parent();
                window.parent.set_address($tr.find('.consignee').text(), $tr.find('.telphone').text(), $tr.find('.address').text(), $tr.find('input[name="zipCode"]').val());
            }
        })
    </script>
</block>